package com.yuan.upload;

import java.io.File;
import java.io.IOException;

public class test {

    public static void main(String[] args) throws IOException {
        File file = new File("d:/test");
        if (!file.exists()) {
            file.mkdir();
            System.out.println("创建目录");
        }

        File file1 = new File("d:/test/" + "filename.txt");
        if (!file1.exists()) {
            file1.createNewFile();
        }

    }
}
